<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="//cdn.bootcss.com/jquery/3.1.1/jquery.js"></script>
</head>
<body>
	<div id="userInfo">
	</div>
	<button id="logout">退出</button>
	
	<script type="text/javascript">
		$.ajax({
			method: 'get',
			url: 'http://localhost:8762/user',
			success: function(resp, status, xhr) {
				$("#userInfo").html(JSON.stringify(resp));
				console.log(xhr.getAllResponseHeaders());
				console.log(xhr);
			}
		});
		
		
		$("#logout").click(function(){
			$.ajax({
				method: 'post',
				url: 'http://localhost:8762/logout',
				success: function(resp) {
					$("#userInfo").html(JSON.stringify(resp));
				}
			});
		});
	</script>
</body>
</html>